# coding:utf-8
from utils.mysql import sql_conn


class MysqlBase:
    def __init__(self, table_name):
        self.conn = sql_conn
        self.table = table_name

    def execute(self, sql, values):
        with self.conn.cursor() as cursor:
            return cursor.execute(sql, tuple(values))

    def insert_id(self):
        return self.conn.insert_id()
